<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>p3_CSS常用值</title>
    <style>
        h1{
            color:red;
            /*rgb表示法(red,green,blue),[0,255]*/
            color:rgb(255,0,0);
            color:rgb(0,255,255);/*反色*/
            color:rgb(0,255,0);
            color:rgb(255,0,255);/*反色*/
            color:rgb(0,0,255);
            color:rgb(255,255,0);/*反色*/
            color:rgb(0,0,0);
            color:rgb(255,255,255);
            color:rgb(128,128,128);
            /*十六进制表示法 三个rgb表示的数字都一样可以简写#rgb*/
            color:#ff0000;
            color:#f00;
            color:#00ff00;
            color:#0f0;
            color:#0000ff;
            color:#00f;
            color:#808080;
            /*rgba表示法(red,green,blue,alpha) a：表示透明度*/
            color: rgba(255,0,0,0.5);/*0可省略不写*/

        }
        .d1 {
            width: 50px;
            height: 100px;/*div高度默认为0，需要设置大小*/
            background-image: url("img/mr.png");/*背景图片*/
            background-size: 50px 100px;/*背景图尺寸宽度 高度*/
            background-color: #000;/*可同时设置背景色*/
        }
        .d2{
            width: 500px;
            height: 300px;
            border:5px solid red;

            background-image: url("img/mr.png");
            background-repeat:no-repeat;/*不允许重复*/
            background-position: 100% 100%;/*原点在屏幕左上角*/
                                /*剩余空间的百分比*/
            background-position: left top;
            background-position: right bottom;
            background-position: center center;
            background-position: center;/*两个center可简写为一个*/
        }
        .d3{
            width: 500px;
            height: 300px;
            /*渐变色(角度值deg,颜色1,颜色2...)*/
            background-image: linear-gradient(30deg,red,orange,yellow);
        }
    </style>
</head>
<body>
    <h2 style="color: rgba(255,0,0,0.055555555)">h2标签</h2>
    <!--.d*3tab键自动生成三个-->
    <div class="d1"></div>
    <div class="d2"></div>
    <div class="d3"></div>

</body>
</html>